// tests/jest-setup.js
import { createApp } from 'vue';

// 创建 Vue 应用实例
const app = createApp({});

// 全局模拟组件
app.component('el-container', { template: '<div><slot/></div>' });
app.component('el-header', { template: '<header><slot/></header>' });
app.component('el-main', { template: '<main><slot/></main>' });
app.component('el-footer', { template: '<footer><slot/></footer>' });
app.component('router-view', { template: '<div class="router-view"></div>' });
app.component('app-menu', { template: '<div>AppMenu</div>' });
app.component('app-copyright', { template: '<div>AppCopyright</div>' });

// 设置环境变量
process.env.LANG = 'zh_CN.UTF-8';
process.env.TZ = 'Asia/Shanghai';

console.log('测试环境初始化完成 - 使用 Vue 3');